﻿package org.philipisapain.events 
{
	import flash.events.Event;
	import flash.utils.getQualifiedClassName;
	
	public class EventHubEvent extends Event
	{		
		protected var _externalize:Boolean;
		public function get externalize():Boolean
		{
			return _externalize;
		}
		
		public var source:String;
		
		public function EventHubEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false, externalize:Boolean = true) 
		{ 
			super(type, bubbles, cancelable);
			_externalize = externalize;
		} 
		
		public override function toString():String 
		{ 
			return formatToString("EventHubEvent", "type", "bubbles", "cancelable", "eventPhase", "externalize"); 
		}
			
		protected static function getClassPath(target:Object):String
		{
			return getQualifiedClassName(target).split("::").join(".") + "::";
		}
	}
	
}